package zyq;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestTeacher {
    public static void main(String[] args) {
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        TeacherDao dao=ac.getBean(TeacherDao.class);
        Teacher teacher=dao.findById(120);
        System.out.println("-----------------");
        System.out.println(teacher);
        System.out.println("学生："+teacher.getStuList());
    }
}